package com.cy.service;

import com.cy.spring.*;

@Component
public class UserService implements BeanNameAware, InitializingBean,UserInterface {

    @Autowired
    private OrderService orderService;

    private String beanName;

    public void test(){
        System.out.println(orderService);
    }

    @Override
    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }

    @Override
    public void afterPerpertiesSet() {
        System.out.println("spring 的初始化方法");
    }
}
